FROM registry.cn-hangzhou.aliyuncs.com/fused/hub-nginx:1.25.3
#ARG ipaddr
ADD default.conf /etc/nginx/conf.d/
ENV IPADDR www.baidu.com
#RUN sed -i "s/localhost/${IPADDR}/g" /etc/nginx/conf.d/default.conf
COPY dist /usr/share/nginx/html/

COPY docker-entrypoint.sh /opt
WORKDIR /opt
RUN chmod a+x ./docker-entrypoint.sh

CMD sh docker-entrypoint.sh ${IPADDR}
#ENTRYPOINT /opt/docker-entrypoint.sh ${IPADDR}

#CMD ["nginx", "-g", "daemon off;"]

LABEL maintainer="liwen"
